﻿using System.Reflection.PortableExecutable;
using JESAI.Core.Module;

namespace JESAI.Platform.WebApi
{
    public class WebApiHost
    {
        public static void StartWebApi(string[] args)
        {
            var builder = WebApplication.CreateBuilder(args);

            var startup = new Startup(builder.Configuration);
            startup.ConfigureServices(builder.Services);
           

            var app = builder.Build();
            
            startup.Configure(app);

            app.UseAuthorization();
            app.MapControllers();
            app.RunAsync();        
        }
    }
}
